The interface files on WWDC '96 CD are version 3.0d3. This is the first general release of the Universal Interfaces 3.0 series. The 3.0 series interfaces will support developing code targeted for Mac OS 8 or System 7. Unlike previous interface files, the 3.0 series interfaces contain conditionals which allow a developer to specify the target OS. Only declarations applicable to that runtime are seen by the compiler. When compiling, a developer should specify one of the following:
BUILDING_FOR_SYSTEM7 - Code is intended to run on System 7.x machine or earlier.
BUILDING_FOR_SYSTEM7_AND_SYSTEM8 - Code is intended to run on System 7 or Mac OS 8 (default),
BUILDING_FOR_SYSTEM8 - Code is intended to run on Mac OS 8 only.
BUILDING_PREEMPTIVE_CODE - Code is intended to run as Mac OS 8 server or driver.
With MPW tools, the flag will usually be specified on the command line (e.g. MrC -d BUILDING_FOR_SYSTEM8). In other development environments, the flag can be specified in a common include file compiled before any system interfaces is compiled (e.g. #define BUILDING_FOR_SYSTEM8 1). If no flag is specified, BUILDING_FOR_SYSTEM7_AND_SYSTEM8 is assumed. Please see at ConditionalMacros.h for more details.
Libraries
The implementation of Mac OS 8 is a large number of shared libraries. Rather than require developers to specify dozens of libraries at link-time, the stub (i.e. link-time) libraries are merged into "conglomerate" stub libraries. The goal is a developer will need to link against only one of these files:
AppMacOS8.stubs - Application is intended to run on Mac OS 8 only (savvy).
AppMacOS8Transitional.stubs - Application is intended to run on Mac OS 8 only (not-savvy).
AppSystem7orMacOS8.stubs - Application is intended to run on System 7 and Mac OS 8.
AppSystem7.stubs - Application is intended to run on System 7 only.
Server.stubs - Mac OS 8 server
Plugin<family>.stubs - Mac OS 8 <family> plugin
AppMacOS8.stubs
This library is used to link applications which will only run on Mac OS 8 (not System 7). These application cannot use any deprecated routines (see ConditionalMacros.h for definition of deprecated).
AppMacOS8Transitional.stubs
This library is used to link applications which will only run on Mac OS 8 (not System 7). The application may use deprecated routines.
AppSystem7orMacOS8.stubs
This library is used to link applications which will can run on Mac OS 8 or System 7, and when running on Mac OS 8 these applications can use new Mac OS 8 routines. This conglomerate contains System 7 stub libraries (e.g. InterfaceLib, DrabLib, etc.) and trimmed Mac OS 8 libraries. In order for an application built with this library to run on System 7, all Mac OS 8 libraries must be weak linked. The file AppSystem7orMacOS8.weak contains a list of all those Mac OS 8 libraries.
AppSystem7.stubs
This library is not used for Mac OS 8 development. It was created to retrofit the model of one conglomerate stub library per link onto System 7 development. It is simply a conglomeration of System 7 libraries. One important note is that it does not include StdCLib. This is because that library is only for code developed in MPW. Currently each development environment has its own C library.
Server.stubs
This library is used to link servers which, or course, will only run on Mac OS 8 (not System 7). The code should have been compiled with -d BUILDING_PREEMPTIVE_CODE.
Plugin<family>.stubs
This is actually a set of conglomerate stub library files. One for each family (e.g. PlugADB.stubs, PluginBlockStorage.stubs, etc.). The code should have been compiled with -d BUILDING_PREEMPTIVE_CODE.
[delta] Note: The naming and packaging of the stub libraries is subject to radical change in future releases.